package org.file5.service;

import java.util.List;

import org.file5.domain.Category;
import org.file5.util.DataBean;

import com.googlecode.objectify.Key;

public interface CategoryService {
	public static String TOP_SITE_ARTICLE_CATEGORY_UID="top$*siteart*$pg";
	public static String TOP_SITE_PRODUCT_CATEGORY_UID="top$*site*$pg";
	public static String TOP_GENERAL_PRODUCT_CATEGORY_UID="top$*general*$pg";

	public Category find(String categoryUid);
	public Category findTopSiteArticleCategory();
	public Category findTopGeneralProductCategory();
	public Category findTopSiteProductCategory();
	public List<Category> getPrimaryCategoryTrail(Key<Category> categoryKey);
	public Category newChildCategory(String categoryUid);
	/**
	 * get Categories
	 * 
	 * @param startPosition
	 * @param maxResult
	 * @param params
	 *            , supported params: 1. Category Uid i.e. primaryCategoryUid 2.
	 *            Category.Type
	 * @return
	 */
	public DataBean<Category> getCategories(int startPosition, int maxResult,
			final Object... params);
	
	public DataBean<Category> getChildCategories(int startPosition, int maxResult,String categoryUid);
	public Category setPrimaryParent(Category category, Category parent);
}
